package com.aaa.day1031demo.demo1;

/**
 * @Description:
 * @author:LiWei
 * @date:2022年10月31日9:27
 */
public class MyThread extends Thread{
    public MyThread(String name){
        super(name);
    }
    //执行的任务体
    @Override
    public void run() {
        for (int i = 0; i < 20; i++) {
            System.out.println(Thread.currentThread()+"线程执行"+i);
            System.out.println(this.getName()+"线程执行"+i);
        }
    }
}
